This invention relates generally to computer storage device configuration, and more particularly to providing persistent volume mount points for logical volumes mounted in a computer system.
Most operating systems associate a logical unit of mass storage with a device name, such as a physical hierarchical name ( device harddisk0partition1 ), and a user-friendly name, such as a drive letter, so that the data on the storage device can be easily accessible by the higher layers of the operating system and user applications. The higher layers of the operating system and user applications assume that the user-friendly names are persistent across boot sessions. In actuality, the names are persistent only as long as the physical configuration of the computer does not change. Persistence cannot be guaranteed because such operating systems assign the user-friendly names in the order in which the storage devices are detected when booting. When the physical locations of the storage devices change, these operating systems will assign the user-friendly names to different devices. Therefore, the consistency of name assignments across multiple boot sessions is not preserved under all circumstances, and the higher operating system layers and user applications will be unable to access the data on the devices without modification.
The process of associating a logical unit, or volume, with the appropriate underlying physical media is commonly referred to in the art as xe2x80x9cmountingxe2x80x9d the logical volume on the physical media. The logical volume must be mounted before the data on the physical media can be accessed.
Standard file systems are typically arranged in a hierarchical tree-structure commonly referred to as a xe2x80x9cnamespacexe2x80x9d with the logical volumes, directories, and files in the namespace assigned a user-friendly name. When the namespace is graphically represented, each directory is illustrated as an intermediate point in the hierarchy. The higher layers of the operating system and user applications specify a path the namespace hierarchy to a destination to access data.
The hierarchy that encompasses all logical volumes in a computer system is the xe2x80x9cglobalxe2x80x9d namespace of the file system. Each logical volume in the computer also has its own xe2x80x9clocalxe2x80x9d namespace which defines directories and files present in the logical volume. A volume mount point in the local namespace of one logical volume is used to xe2x80x9cgraftxe2x80x9d the local namespace of a second logical volume into the namespace of the first logical volume. However, because the user-friendly names are not persistent, the consistency of the volume mount points in the global namespace cannot be guaranteed across multiple boot sessions.
Therefore, there is a need in the art for an operating system that provides persistent user-friendly names and guarantees the consistency of volume mount points despite physical configuration changes in the underlying storage media.
The above-mentioned shortcomings, disadvantages and problems are addressed by the present invention, which will be understood by reading and studying the following specification.
Unique volume identifiers for logical volumes are used to associate logical volumes created from computer system storage devices with persistent xe2x80x9credirectedxe2x80x9d mount names to create a self-describing namespace on the computer. Information regarding volume mount points hosted by a logical volume are stored on the physical device underlying the logical volume so that the relationships between the host logical volume and target logical volumes mounted on the volume mount points can be reconstituted when the system containing the logical volumes is rebooted, when the underlying physical devices are moved with the system, and when the logical volumes are transported to a different system. A data structure stored on the physical device contains the directory name of the volume mount point and the unique identifier and a globally unique mount name of the target logical volume mounted at the volume mount point. When the target logical volume is present in the system, symbolic links are created to relate the volume mount point name to a device name for the target logical volume so that pathnames containing the directory junction name are resolved correctly. If the target volume is not present in the system, the corresponding symbolic link does not exist, so an incorrect logical volume cannot be mounted onto a volume mount point.
When the physical configuration of the computer changes, the device name changes but the unique volume identifier does not. The unique volume identifier is used to locate the appropriate mount name and/or drive letter in its data structure and a new symbolic link is created with the new device name so that the symbolic link resolves the mount name and/or drive letter to the correct logical volume under all circumstances.
Because the logical volume is created through its unique volume identifier and is not reliant on the devices being located in any particular order in the system, or being discovered in any particular order during the boot process, or being present only during the boot process, changes in the physical configuration of the computer between boots, or during a boot session, have no effect on the higher layers of the operating system and user applications which rely on the redirected name. Thus, the level of indirection provided by the persistent mount names guarantees that the higher layers of the operating system and user applications will be able to access data on a logical volume for the life of the logical volume without modifications. Furthermore, because the logical volumes contain the volume mount point information, neither user knowledge nor intervention is required to reconstitute the namespace representing the logical volumes.
In one aspect of the invention, a data structure is described that contains the unique volume identifiers and persistent mount names. In another aspect of the invention, a mount manager is described that creates and maintains the data structure.
The present application describes computer systems, methods, and computer-readable media of varying scope. The mount manager is variously described as causing the processor of a computer to perform certain actions, as a series of steps executed from a computer-readable medium, and in terms of its interaction with objects and other system components in an object-based operating system. However, the invention is equally applicable in environments which provide for associating the unique volume identifiers, the persistent names, and the logical volume without requiring a separate mount manager or the particular data structures described in the present application. In addition to the aspects and advantages of the present invention described in this summary, further aspects and advantages of the invention will become apparent by reference to the drawings and by reading the detailed description that follows.